Just started working through the SwiftUI tutorial for iOS on the apple developer website. Freshly installed xCode on a new M1 mac... onAppear AND onDisappear would trigger on appearance, and both would trigger AGAIN on disappearance.
Opened up the console and saw this assertion error
displayModeButtonItem is internally managed and not exposed for DoubleColumn style
People had similar issues with that error, adding this to the root NavigationView fixed the error for my use case
.navigationViewStyle(StackNavigationViewStyle())
Hope this helps someone!